#include "StdAfx.h"
#include "Dict.h"


Dict::Dict(void)
{
	wcscpy(szName,L"default");
	wcscpy(szType,L"Anh-Viet");
}


Dict::~Dict(void)
{
}

_bstr_t Dict::SearchWord()
{
	return dbAcess.ListWord(szName,szType);
}

bool Dict::AddWord(LPTSTR pronoun,LPTSTR word,LPTSTR dic,
	LPTSTR mean,LPTSTR type,LPTSTR exam,LPTSTR dicType, LPTSTR dictName,int flag)
{
	return dbAcess.AddWord(pronoun,word,dic,mean,type,exam,flag);
}

bool Dict::DeleteWord(LPTSTR word)
{
	return dbAcess.DeleteWord(word);
}

int  Dict::CountWord()
{
	return _wtoi(dbAcess.CountWord(szName,szType));
}

bool Dict::AddDic()
{
	return dbAcess.AddDic(szType,szName);
}